import { Controller, Get, Post, Body, Patch, Param, Delete, Query } from '@nestjs/common';
import { CustomFormSubmitService } from './custom-form-submit.service';
import { CreateCustomFormSubmitDto } from './dto/create-custom-form-submit.dto';
import { UpdateCustomFormSubmitDto } from './dto/update-custom-form-submit.dto';

@Controller('custom-form-submit')
export class CustomFormSubmitController {
  constructor(private readonly customFormSubmitService: CustomFormSubmitService) {}

  @Post()
  create(@Body() createCustomFormSubmitDto: CreateCustomFormSubmitDto) {
    return this.customFormSubmitService.create(createCustomFormSubmitDto);
  }

  @Get()
  findAll(@Query() querys) {
    return this.customFormSubmitService.findAll(querys);
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.customFormSubmitService.findOne(id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateCustomFormSubmitDto: UpdateCustomFormSubmitDto) {
    return this.customFormSubmitService.update(id, updateCustomFormSubmitDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.customFormSubmitService.remove(id);
  }
}
